﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DesignPattern.TemplateMethodPattern
{
    //模板方法抽象类,把不同的都定义成抽象的
    public abstract class AbstractClass
    {
        public abstract void Operation1();

        public abstract void Operation2();

        public void TemplateMethod()
        {
            Operation1();
            Operation2();
            Console.WriteLine("执行好了");
        }
    }
}
